package gui.menu.actions;

import gui.Frame;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Icon;
import javax.swing.ImageIcon;

public class UndoAction extends AbstractAction
{

   private static Icon icon = new ImageIcon("icons/undo.png");
   /**
    * 
    */
   private static final long serialVersionUID = 1L;
   private Frame frame;
   public UndoAction(Frame frame)
   {
      super("Undo",icon);
      this.frame = frame;
   }

   @Override
   public void actionPerformed(ActionEvent arg0)
   {
      // TODO Auto-generated method stub
      frame.getUndoRedoStack().undo();
      Frame.setUndoRedoVisible();
      frame.getView().repaint();
   }

}
